package com.zhijian.medical.controller;

import com.zhijian.medical.entity.po.RoutinePatientYz;
import com.zhijian.medical.entity.po.RoutineQcHandle;
import com.zhijian.medical.entity.vo.request.RoutinePatientYzSearchVo;
import com.zhijian.medical.entity.vo.request.RoutineQcHandleSearchVo;
import com.zhijian.medical.service.RoutinePatientYzService;
import com.zhijian.response.annotation.Response;
import com.zhijian.util.page.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Slf4j
@Controller
@Api(tags = "常规病理-病人医嘱")
public class RoutinePatientYzController {

    @Autowired
    RoutinePatientYzService routinePatientYzService;

    /**
     * 剩余组织处理列表
     *
     * @param param
     * @return
     */
    @Response
    @PostMapping("/routine/Patient/yz/zh")
    @ApiOperation("常规病理-免疫组化")
    public Page<RoutinePatientYz> selectMyPage(@RequestBody RoutinePatientYzSearchVo param) {
        log.info("{} - {}| insert info", this.getClass().getSimpleName(), param);
        param.setYzType(1);
        return routinePatientYzService.selectPageList(param);
    }

    @Response
    @PostMapping("/routine/Patient/yz/zh/detail")
    @ApiOperation("常规病理-免疫组化详情")
    public List<RoutinePatientYz> selectDetailMyPage(@RequestBody RoutinePatientYzSearchVo param) {
        log.info("{} - {}| insert info", this.getClass().getSimpleName(), param);
        param.setYzType(1);
        return routinePatientYzService.selectYzDetailPageList(param);
    }

    @Response
    @PostMapping("/routine/Patient/yz/sr")
    @ApiOperation("常规病理-特殊染色")
    public Page<RoutinePatientYz> selectMySrPage(@RequestBody RoutinePatientYzSearchVo param) {
        log.info("{} - {}| insert info", this.getClass().getSimpleName(), param);
        param.setYzType(2);
        return routinePatientYzService.selectPageList(param);
    }

    @Response
    @PostMapping("/routine/Patient/yz/sr/detail")
    @ApiOperation("常规病理-特殊染色详情")
    public List<RoutinePatientYz> selectDetailMySrPage(@RequestBody RoutinePatientYzSearchVo param) {
        log.info("{} - {}| insert info", this.getClass().getSimpleName(), param);
        param.setYzType(2);
        return routinePatientYzService.selectYzDetailPageList(param);
    }
}
